package com.erpoa.multiple;

public class DatabaseContextHolder {
    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();
    //默认数据源
    public static final String ERP = "erp";
    public static final String WMS = "wms";
    public static final String DSX5 ="dsx5";
    public static final String pingzhi ="pingzhi";

    public static void setDatabaseType(String type) {
        contextHolder.set(type);
    }

    public static String getDatabaseType() {
        return contextHolder.get();
    }

    public static void clearDataSource() {
        contextHolder.remove();
    }

}
